Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

fix(build): fix sourcemap logic #1541

Merged
merged 1 commit into from
Mar 31, 2016

Conversation

wesleycho
Copy link
Contributor

  • Fix sourcemap generation
  • Upgrade plugins

- Fix sourcemap generation
- Upgrade plugins
@deeg
Copy link
Contributor

deeg commented Mar 30, 2016

This LGTM

@user378230 user378230 merged commit 86b7b92 into angular-ui:master Mar 31, 2016
.pipe($.header(config.banner, {
timestamp: (new Date()).toISOString(), pkg: config.pkg
}))
.pipe($.concat('select.css'))
.pipe(gulp.dest('dist'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wesleycho I've had to restore this line locally to get select.css saved to dist, are you sure it should have been removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not necessary to have sourcemaps unless it's minified, no?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think what you're saying is correct, double negatives and all 👀

We are always minifying though, I think the maps are generated fine but the unminified css isn't saved to dist.

With:

  return gulp.src(['src/common.css'], {base: 'src'})
    .pipe($.sourcemaps.init())
    .pipe($.header(config.banner, {
      timestamp: (new Date()).toISOString(), pkg: config.pkg
    }))
    .pipe($.concat('select.css'))
    .pipe(gulp.dest('dist'))
    .pipe($.minifyCss())
    .pipe($.concat('select.min.css'))
    .pipe($.sourcemaps.write('../dist', {debug: true}))
    .pipe(gulp.dest('dist'));

I get

  - select.min.css
  - select.min.css.map
  - select.min.js
  - select.min.js.map
  - select.css
  - select.js

With:

 return gulp.src(['src/common.css'], {base: 'src'})
    .pipe($.sourcemaps.init())
    .pipe($.header(config.banner, {
      timestamp: (new Date()).toISOString(), pkg: config.pkg
    }))
    .pipe($.concat('select.css'))
    //.pipe(gulp.dest('dist'))
    .pipe($.minifyCss())
    .pipe($.concat('select.min.css'))
    .pipe($.sourcemaps.write('../dist', {debug: true}))
    .pipe(gulp.dest('dist'));

I get:

  - select.min.css
  - select.min.css.map
  - select.min.js
  - select.min.js.map
  - select.js

Note the missing select.css, easy enough to fix just wanted to be sure I was doing it right.

user378230 added a commit to user378230/ui-select that referenced this pull request Apr 4, 2016
Resolves bad changes made in angular-ui#1541 which caused no select.css to be
generated as part of the build.
user378230 added a commit that referenced this pull request Apr 4, 2016
Resolves bad changes made in #1541 which caused no select.css to be
generated as part of the build.
@wesleycho wesleycho deleted the fix/sourcemaps branch April 6, 2016 16:16
fcaballero pushed a commit to fcaballero/ui-select that referenced this pull request Apr 17, 2016
Resolves bad changes made in angular-ui#1541 which caused no select.css to be
generated as part of the build.
fcaballero pushed a commit to fcaballero/ui-select that referenced this pull request Apr 25, 2016
Resolves bad changes made in angular-ui#1541 which caused no select.css to be
generated as part of the build.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants